<template>
    <el-breadcrumb>
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item :to="current.path" v-if="current" >{{current.label}}</el-breadcrumb-item>
    </el-breadcrumb>
</template>
<script setup>
import { computed, ref } from "vue"; 
import { useStore } from 'vuex' // 引入useStore 方法
const store = useStore()  // 该方法用于返回store 实例
console.log('store=',store.state.currentMenu)  // store 实例对象
let current = computed(()=>{
    return store.state.currentMenu.currentMenu
})
console.log('current=',current)  // store 实例对象

</script>
